From 668fe87cadd2fa7e2a10c426b105e1bb98fd3b1a Mon Sep 17 00:00:00 2001 From: "cl349@firebug.cl.cam.ac.uk" Date: Thu, 16 Feb 2006 11:30:44 +0000 Subject: [PATCH] Check for the entire kernel range for temporarily cleared PMD entries. From: Jan Beulich Signed-off-by: Christian Limpach --- linux-2.6-xen-sparse/arch/x86_64/mm/fault-xen.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/linux-2.6-xen-sparse/arch/x86_64/mm/fault-xen.c b/linux-2.6-xen-sparse/arch/x86_64/mm/fault-xen.c index 40d48bc7b8..5465e26d1c 100644 --- a/linux-2.6-xen-sparse/arch/x86_64/mm/fault-xen.c +++ b/linux-2.6-xen-sparse/arch/x86_64/mm/fault-xen.c @@ -366,12 +366,12 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, */ if (unlikely(address >= TASK_SIZE64)) { /* - * Don't check for the module range here: its PML4 - * is always initialized because it's shared with the main - * kernel text. Only vmalloc may need PML4 syncups. + * Must check for the entire kernel range here: with writable + * page tables the hypervisor may temporarily clear PMD + * entries. */ if (!(error_code & (PF_RSVD|PF_USER|PF_PROT)) && - ((address >= VMALLOC_START && address < VMALLOC_END))) { + address >= PAGE_OFFSET) { if (vmalloc_fault(address) < 0) goto bad_area_nosemaphore; return; -- 2.30.2